function AddNewProductView() {
	this.parent();
}

AddNewProductView.inherits(BaseView, {
	init : function() {
		var data = new CategoriesModel().createModel();
		this.createCateNode(data.categories);
		this.onclickbtnAdd();
	},

	createCateNode : function(arrCate) {
		var rootNode = $id("fillcategory");
		var nodeCateName = null;
		var nodeOption = null;
		var nodeDiv = null;
		var cate = null;
		var length = arrCate.length;
		rootNode.innerHTML = "";

		for (var i = 0; i < arrCate.length; i++) {
			cate = arrCate[i];
			
			nodeOption = createNode("option");
			nodeOption.text = cate.categoryName;
			nodeOption.value = cate.categoryId;
			rootNode.appendChild(nodeOption);

			//nodeDiv = createDiv();
			// nodeCb = createCheckboxElements();
			// nodeCb.setAttribute("value", cate.categoryId);
			// nodeCb.value = cate.categoryId;
			// nodeCateName = createNode("span");
			// var cateName = createTextNode(cate.categoryName);
			// nodeCateName.appendChild(cateName);

			//nodeDiv.appendChild(nodeCb);
			//nodeDiv.appendChild(nodeCateName);
			//rootNode.appendChild(nodeCb);
		}

	},

	onclickbtnAdd : function() {
		$id("btnAddProduct").setAttribute("onclick", "onclickbtnAddProduct()");
	}
});
